package com.example.park_2306.adapter

import androidx.core.view.isVisible
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.base.entity.VideoEntityItem
import com.example.park_2306.R
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer

class VideoAdapter :BaseQuickAdapter<VideoEntityItem,BaseViewHolder>(R.layout.item_video) {


    override fun convert(helper: BaseViewHolder, item: VideoEntityItem) {
        //找到视频播放控件
        val gsy = helper.getView<StandardGSYVideoPlayer>(R.id.gsy)

        gsy.setUp(item.videopath,true,"")
        gsy.backButton.isVisible = false//隐藏返回按钮
        gsy.startPlayLogic()
    }
}
